<html>
<script src="../../../resources/js-test.js"></script>
<script>
description("Document.elementFromPoint() against empty document shouldn't crash.");
window.jsTestIsAsync = true;
toBeRemoved = document.documentElement;
toBeRemoved.remove();
window.setTimeout(function() {
    document.elementFromPoint(0, 0);
    document.appendChild(toBeRemoved);
    debug("PASS unless crash");
    finishJSTest();
}, 0);
</script>
</html>
